<?php

namespace common\validate;

class DelayOrderTaskStepCategoryConfirm extends BaseValidate
{
    // Confirm 验证场景定义
    public function sceneConfirm()
    {
        return $this->append('data', 'require|array');
    }

    // ConfirmItem 验证场景定义
    public function sceneConfirmItem()
    {
        return $this
            ->append('id', 'require|integer')
            ->append('is_pass', 'require|in:yes,no')
            ->append('need_delay', 'in:yes,no')
            ->append('delay_to', 'integer');
    }

    // DetailByDelayOrderId 验证场景定义
    public function sceneDetailByDelayOrderId()
    {
        return $this
            ->append('param.delay_order_id|延期单id', 'integer')
            ->append('param.project_id|项目id', 'integer')
            ->append('param.episode_id|剧集id', 'integer')
            ->append('param.module_code|模块code', 'in:asset,shot');
    }


    // ManagerConfirm 验证场景定义
    public function sceneManagerConfirm()
    {
        return $this->append('data', 'require|array');
    }

    // ManagerConfirmItem 验证场景定义
    public function sceneManagerConfirmItem()
    {
        return $this
            ->append('id|延期单任务id', 'require|integer')
            ->append('is_pass|确认状态', 'require|in:yes,no');
    }

    // DelayTaskList 验证场景定义
    public function sceneDelayTaskList()
    {
        return $this
            ->append('param.delay_order_id|延期单id', 'integer')
            ->append('param.project_id|项目id', 'integer')
            ->append('param.module_code|模块code', 'in:asset,shot');
    }

    // ConfirmedCheck 验证场景定义
    public function sceneConfirmedCheck()
    {
        return $this
            ->append('param.delay_order_task_id_list|延期单任务ID列表', 'require|array');
    }
}
